package com.lantosec.hmrp.modules.archives.entity;

import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.archives.vo.UserWorkVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 履历信息表 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserWork extends BaseEntity<UserWorkVO> {

    private static final long serialVersionUID = 1L;
    public UserWork(UserWorkVO vo){
        this.userWorkId = vo.getUserWorkId();
        this.userId = vo.getUserId();
        this.startDate = vo.getStartDate();
        this.endDate = vo.getEndDate();
        this.workUnit = vo.getWorkUnit();
        this.deptName = vo.getDeptName();
        this.duty = vo.getDuty();
        this.majorDuty = vo.getMajorDuty();
        this.majorPerformance = vo.getMajorPerformance();
        this.voucher = vo.getVoucher();
        this.voucherPhone = vo.getVoucherPhone();
        this.leaveReason = vo.getLeaveReason();
        this.backCheck = vo.getBackCheck();
        this.remark = vo.getRemark();
        this.createId = vo.getCreateId();
        this.createUser = vo.getCreateUser();
        this.createTime = vo.getCreateTime();
        this.verifyId = vo.getVerifyId();
        this.verifyUser = vo.getVerifyUser();
        this.verifyTime = vo.getVerifyTime();
        this.verifyStatus = vo.getVerifyStatus();
    }

    @Override
    public UserWorkVO convertToVO(){
        return new UserWorkVO(this);
    }


    /**
     * 主键ID
     */
    @TableId(value = "user_work_id", type = IdType.ASSIGN_UUID)
    private String userWorkId;

    /**
     * user主表ID
     */
    private String userId;

    /**
     * 履历开始时间
     */
    private String startDate;

    /**
     * 履历结束时间
     */
    private String endDate;

    /**
     * 工作单位
     */
    private String workUnit;

    /**
     * 所在科室
     */
    private String deptName;

    /**
     * 职务
     */
    private String duty;

    /**
     * 主要职责
     */
    private String majorDuty;

    /**
     * 主要业绩
     */
    private String majorPerformance;

    /**
     * 证明人
     */
    private String voucher;

    /**
     * 证明人电话
     */
    private String voucherPhone;

    /**
     * 离职原因
     */
    private String leaveReason;

    /**
     * 背景调查
     */
    private String backCheck;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人ID
     */
    private String createId;

    /**
     * 创建人姓名
     */
    private String createUser;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 审核人ID
     */
    private String verifyId;

    /**
     * 审核人姓名
     */
    private String verifyUser;

    /**
     * 审核时间
     */
    private Date verifyTime;

    /**
     * 审核状态（0：未审核，1：以审核）
     */
    private Integer verifyStatus;


    public enum ColName {
        user_work_id, user_id, start_date, end_date, work_unit, dept_name, duty, major_duty, major_performance, voucher, voucher_phone, leave_reason, back_check, remark, create_id, create_user, create_time, verify_id, verify_user, verify_time, verify_status, 
    }
}
